Conversation
|
@microsoft-github-policy-service agree |
|
pytorch/pytorch#147052 (comment)
I think this PR’s implementation already uses result = op.STFT(signal, frame_step_const, window, frame_length_const, onesided=onesided)So I don’t think an decay to |
|
Hi! pytorch/pytorch#147052 (comment)
Could you elaborate a bit on this comment at your convenience? (If you think this simplification is necessary.) |
There was a problem hiding this comment.
Pull Request Overview
This PR implements the aten::stft (Short-Time Fourier Transform) operator to resolve issue #147052. The implementation includes handling for various optional parameters like hop_length, win_length, window, normalized, onesided, and return_complex.
Key changes:
- Added STFT operator implementation with helper functions for batch dimension handling, window centering, and FFT normalization
- Registered the operator in test data with appropriate tolerance settings and xfail for float16 dtype
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| onnxscript/function_libs/torch_lib/ops/core.py | Implements aten_stft and five helper functions for STFT processing |
| tests/function_libs/torch_lib/ops_test_data.py | Registers the new operator in test suite with tolerance and xfail configuration |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2645 +/- ##
=======================================
Coverage 70.11% 70.11%
=======================================
Files 225 225
Lines 27083 27138 +55
Branches 2721 2730 +9
=======================================
+ Hits 18990 19029 +39
- Misses 7153 7165 +12
- Partials 940 944 +4 ☔ View full report in Codecov by Sentry. |
titaiwangms
left a comment
There was a problem hiding this comment.
Some minor comments and this should be the final pass.
cc @justinchuby I remember you said something stft implementation was wrong. This is heavily following the original one. Would you care share about your comments?
|
Thanks - I need to read this more closely to remind myself what was going on then |
justinchuby
left a comment
There was a problem hiding this comment.
Thanks. I don't have a better idea
|
@moatom Could you do a final pass, and make sure lint is passing. |
|
@titaiwangms I resolved all of them. Could you please confirm when you have a moment? |
|
If possible, could you help add a few tests to https://github.com/microsoft/onnxscript/blob/main/tests/function_libs/torch_lib/e2e_ops_tests.py ? Thanks a lot! |
76ffeca to
c0fd969
Compare
DONE |
I am sorry. I will fix it now. |
Head branch was pushed to by a user without write access
DONE. |
Fixed pytorch/pytorch#147052